﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Storage;
using System.Data;

namespace Open.Domain.Abstractions
{
    public interface IUnitOfWork : IDisposable
    {
        public IDbConnection GetConnection();
        public DbContext GetDbContext();
        public Task<IDbContextTransaction> BeginTransactionAsync();
        public Task CommitTransactionAsync(IDbContextTransaction transaction);
        public void RollbackTransaction();
    }
}
